package nz.co.doherty.gwtpbreadcrumbs.client;

import nz.co.doherty.gwtpbreadcrumbs.client.i8n.ClientConstants;

import com.google.gwt.user.client.Window;
import com.google.inject.Inject;
import com.philbeaudoin.gwtp.mvp.client.proxy.ProxyFailureHandler;

public class FailureHandlerAlert implements ProxyFailureHandler {

	  private final ClientConstants constants;

	  @Inject
	  public FailureHandlerAlert( ClientConstants constants ) {
	    this.constants = constants;
	  }
	  
	  @Override
	  public void onFailedGetPresenter(Throwable caught) {
	    Window.alert( constants.codeLoadFailure() );
	  }

	}
